<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>新增单位</title>
    <meta http-equiv="keywords" content="enter,your,keywords,here" />
    <meta http-equiv="description" content="A short description of this page." />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="${basePath}css/cmxform.css" />
    <#include "/template/head.html">
    <script language="javascript">
    $.metadata.setType("attr", "validate");
    $(function() {
      $('#dwdmForm').validate({
        submitHandler:function(form) {
          $.get("${basePath}admin/dwdm/vldDlmc.do",{dlmc:$("#dlmc").val()},function(data){
            if(data.success){
              form.submit();
            } else {
              $("#dlmc").focus();
              $("#label4dlmc").html('<img src="${basePath}img/unchecked.gif" />'+data.msg+'');
            }
          })
        }
      });
    });
    </script>
  </head>
  <body>
    <br />
    <form id="dwdmForm" action="${basePath}/admin/dwdm/save.do" method="post">
      <table  class="cmxform" style="width: 85%" cellspacing="1">
        <caption>新&nbsp;&nbsp;&nbsp;增&nbsp;&nbsp;&nbsp;单&nbsp;&nbsp;&nbsp;位</caption>
        <tr>
          <th width="20%"><label for="sjdwID">上级单位：</label> </th>
          <td>
            <select name="sjdwId" class="required">
              <#list sjdws as item>
              <option value="${item.dwid}">${item.dwmc}</option>
              </#list>
            </select>
          </td>
        </tr>
        <tr>
          <th><label for="role.id">角色：</label></th>
          <td>
            <select name="role.id" class="required">
              <option value="">--选择--</option>
              <#list roles as item>
              <option value="${item.id}">${item.roleName}</option>
              </#list>
            </select>
          </td>
        </tr>
        <tr>
          <th><label for="dlmc">登录名称：</label></th>
          <td>
            <input id="dlmc" name="dlmc" validate="required:true,minlength:4" /><span id="label4dlmc"></span>
          </td>
        </tr>
        <tr>
          <th><label for="dwmc">单位名称：</label></th>
          <td><input name="dwmc"/></td>
        </tr>
        <tr>
          <th><label for="qq">QQ号码：</label></th>
          <td><input name="qq" class="number"/></td>
        </tr>
        <tr>
          <th><label for="email">邮箱：</label></th>
          <td><input name="email" class="email"/></td>
        </tr>
        <tr>
          <th><label for="tel">电话号码：</label></th>
          <td><input name="tel" class="tel"/></td>
        </tr>
        <tr>
          <th></th>
          <td colspan="3"><button type="submit" class="save"/></td>
        </tr>
      </table>
    </form>
  </body>
</html>
